using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Xml;
using System.IO;
using System.Text;
using System.Xml.XPath;
using System.Xml.Xsl;

public partial class PgMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
     
        if (Session["UserName"] != null)
        {
            lblUserName.Text = "<font color=white>Hi </font><font color=red>'" + Session["UserName"].ToString() + "'</font>";
            lblUserName.Visible = true;
            ibtnLogout.Visible = true;
        }
        else
        {
            lblUserName.Visible = false;
            ibtnLogout.Visible = false;
        }
    }

    protected void ibtnLogout_Click1(object sender, ImageClickEventArgs e)
    {
        Session.Clear();
        Session.RemoveAll();
        Session.Abandon();
        Response.Redirect("Login.aspx", true);
    }
}
